﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using EB.SQL;
/// <summary>
/// Summary description for paymentreqstgenclass
/// </summary>
public class paymentreqstgenclass
{
    int _requestTypeID;
    int _requesterID;
    int _requestStatus;
    string _creationTime;
     string _lastProcessedTime;
    Int64 _linkKey;
    int _currentStep;
    int _stepStatus;
   
    string _constring;
    public static int _idkey;
    SqlInsertHelper _sqlInserer = new SqlInsertHelper();
    public string Constring
    {
        get { return _constring; }
        set
        {
            _constring = value;
            _sqlInserer.ConString = _constring;
        }
    }
    public int RequestTypeID
    {
        get { return _requestTypeID; }
        set
        {
            _requestTypeID = value;
            ValueDetails field = new ValueDetails(VariableType.Integer);
            field.Value = _requestTypeID.ToString();
            _sqlInserer.Fields.Add("RequestTypeID", field);
        }
    }
    public int RequesterID
    {
        get { return _requesterID; }
        set
        {
            _requesterID = value;
            ValueDetails field = new ValueDetails(VariableType.Integer);
            field.Value = _requesterID.ToString();
            _sqlInserer.Fields.Add("RequesterID", field);
        }
    }
    public string CreationTime
    {
        get { return _creationTime; }
        set
        {
            _creationTime = value;
            ValueDetails field = new ValueDetails(VariableType.StringfValue);
            field.Value = _creationTime.ToString();
            _sqlInserer.Fields.Add("CreationTime", field);
        }
    }
    public int RequestStatus
    {
        get { return _requestStatus; }
        set
        {
            _requestStatus = value;
            ValueDetails field = new ValueDetails(VariableType.Integer);
            field.Value = _requestStatus.ToString();
            _sqlInserer.Fields.Add("Status", field);
        }
    }
    public string LastProcessedTime
    {
        get { return _lastProcessedTime; }
        set
        {
            _lastProcessedTime = value;
            ValueDetails field = new ValueDetails(VariableType.StringfValue);
            field.Value = _lastProcessedTime.ToString();
            _sqlInserer.Fields.Add("LastUpdatedTime", field);
        }
    }
    public Int64 LinkKey
    {
        get { return _linkKey; }
        set
        {
            _linkKey = value;
            ValueDetails field = new ValueDetails(VariableType.Integer);
            field.Value = _linkKey.ToString();
            _sqlInserer.Fields.Add("LinkKey", field);
        }
    }
    public int CurrentStep
    {
        get { return _currentStep; }
        set
        {
            _currentStep = value;
            ValueDetails field = new ValueDetails(VariableType.Integer);
            field.Value = _currentStep.ToString();
            _sqlInserer.Fields.Add("CurrentStep", field);
        }
    }
    public int StepStatus
    {
        get { return _stepStatus; }
        set
        {
            _stepStatus = value;
            ValueDetails field = new ValueDetails(VariableType.Integer);
            field.Value = _stepStatus.ToString();
            _sqlInserer.Fields.Add("StepStatus", field);
        }
    }
    public int AddRequestList()
    {
        int id = 0;
        try
        {


            _sqlInserer.TableName = "RequestList";
            _sqlInserer.KeyPrimary = "RequestID";
            id=_sqlInserer.ExecInsert();
           _idkey = id;
            return id;
        }
        catch (Exception ex)
        {
            //redirect to error page
            
        }
        return id;
    }


	public paymentreqstgenclass()
	{
		
	}
}
